import request from '@/utils/request'

//系统重启接口
export function reboot(data) {
  return request({
    url: 'api/operations/reboot',
    method: 'post',
    data: data
  })
}

//恢复出厂设置接口
export function restoreDefaultSetting(data) {
  return request({
    url: 'api/operations/restoreDefaultSetting',
    method: 'post',
    data: data
  })
}

//恢复出厂设置接口
export function restoreSetting(data) {
  return request({
    url: 'api/operations/restoreSetting',
    method: 'post',
    data: data
  })
}

//格式化sd卡接口
export function sdcardFormat(data) {
  return request({
    url: 'api/system/sdcardFormat',
    method: 'post',
    data: data
  })
}

//获取sd卡信息接口
export function sdcardInfo(query) {
  return request({
    url: 'api/system/sdcardInfo',
    method: 'get',
    params: query
  })
}


//获取时区接口
export function getSysTime(query) {
  return request({
    url: 'api/system/datetime',
    method: 'get',
    params: query
  })
}

//设置时间接口
export function setSysTime(data) {
  return request({
    url: 'api/system/datetime',
    method: 'post',
    data: data
  })
}


//获取485
export function get485(query) {
  return request({
    url: 'api/system/rs485Config',
    method: 'get',
    params: query
  })
}

//设置485
export function set485(data) {
  return request({
    url: 'api/system/rs485Config',
    method: 'post',
    data: data
  })
}
